Skip to content

client: a read-only window draws no DSH Agent or session menu write - #2272

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/3-agent-menu-readonly
Nov 3, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/3-agent-menu-readonly

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2271

Written-by: Dev3
Owner: Dev3
Reviewer: Birfy
Claim-Id: 10086412d5f44cf6a6c788d4df73bc08
Branch: dev/3-agent-menu-readonly
Base: 551375d
Tree: db9a8ef61a66a532e53814e09a709e459b1c75bc
Verified commit: dc8d3a1
Pushed head: dc8d3a1

Scope

A read-only FlyBot window still draws the DSH Agent menu's Pin/Unpin and Remove DSH Agent, and a session menu's Rename and Archive, although the host refuses all four (set-flags, remove-agent, agent-rename and agent-archive are not reads) so each row only ends in a failure toast. AgentMenu now reads the roster's read-only sentence once, the same way the rest of the client does, and drops those four rows; a writable window keeps every row exactly as it is, and a menu whose every row is a write is not drawn at all instead of leaving an empty box.

Files

  • core/src/client/context-menu.js — the gate in AgentMenu
  • core/test/context-menu-agent-readonly.test.js — the test and its counter-proofs
  • docs/subsystems/core-client.md — the owned doc
  • changelog.d/2271-agent-menu-readonly.fixed.md — the fragment
  • core/client.js — the regenerated bundle
  • patches/ds-bot/0003-flybot-api-client.patch, patches/ds-bot/0008-client-bundle.patch, patches/ds-bot/files/test/context-menu-agent-readonly.test.js — the regenerated mirrors

Ready for review at the tip above.

Checkpoint

{
  "pr": 2272,
  "claim": "Dev3",
  "issue": 2271,
  "summary": "AgentMenu now reads the roster's read-only sentence the same way the rest of the client does, so a locked window draws no Pin/Unpin, Remove DSH Agent, Rename or Archive row. A menu whose every row is a write is not drawn at all instead of leaving an empty box. A writable window keeps every row exactly as it was, and the new test pins the same rendering. The owned subsystem doc and the changelog fragment carry the change.",
  "files": [
    "core/src/client/context-menu.js",
    "core/test/context-menu-agent-readonly.test.js",
    "docs/subsystems/core-client.md",
    "changelog.d/2271-agent-menu-readonly.fixed.md",
    "core/client.js",
    "patches/ds-bot/0003-flybot-api-client.patch",
    "patches/ds-bot/0008-client-bundle.patch",
    "patches/ds-bot/files/test/context-menu-agent-readonly.test.js"
  ],
  "checks": {
    "ran": "npm run build (core); node scripts/ds-bot-patches.mjs generate, canonical and check; node core/scripts/build-client.mjs --check; TZ=UTC ARCH_DOCS_BASE=551375dd npm run verify",
    "result": "green",
    "at": "dc8d3a15aacf86dacb051f6f50d1fd6fe6afdf21"
  },
  "next": "none — ready for review"
}

@github-actions github-actions Bot added the risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff label Nov 3, 2026
@HugoXK
HugoXK force-pushed the dev/3-agent-menu-readonly branch from ce30175 to dc8d3a1 Compare November 3, 2026 12:41
@HugoXK
HugoXK marked this pull request as ready for review November 3, 2026 12:52
@HugoXK

HugoXK commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Written-by: Dev3

@Birfy — Advisory PASS by FlyBot Test at this tip (independent recheck): red-first on clean 551375d with only the new test was 4 tests / 2 pass / 2 fail — a read-only window still offered ['Pin','Remove DSH Agent'] in the DSH Agent menu and drew an empty menu box — and the same file is 4/4/0 at dc8d3a15…. Its own render probe is 50/50: in a read-only window the Agent menu (unpinned and pinned) and the Session menu render null (0 rows, 0 role="menu"), and the five writable menus hash identically to base. Generation chain zero-write (patches check 10/10, canonical no-op), npm run verify 4694/4694/0, arch-docs: OK (8 changed file(s)).

Tip dc8d3a15aacf86dacb051f6f50d1fd6fe6afdf21, base 551375dda317e9686351441aad431fce400fddc7, 8 files +347/−16. The draft flag is cleared; nothing else changed at this tip.

@Birfy
Birfy added this pull request to the merge queue Nov 3, 2026
The DSH Agent row's menu painted Pin, Unpin and Remove DSH Agent, and a
Session's menu painted Rename and Archive, even when the roster said the
window is read-only: the host refuses set-flags, remove-agent, agent-rename
and agent-archive for such a window, so the row only produced a failure
toast. Compute one `locked` from `roster.readOnly` the way the Bot menu
already does and drop those rows there; with every row hidden the menu
draws nothing rather than an empty box. Refs ThinkFlowLab#2253.
Merged via the queue into ThinkFlowLab:main with commit 4765885 Nov 3, 2026
17 checks passed
@Birfy
Birfy deleted the dev/3-agent-menu-readonly branch November 3, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core: a read-only window's DSH Agent and session menus still offer Pin, Remove DSH Agent, Rename and Archive

2 participants